package com.mt.skyhoist.util.view;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.NonNull;

import android.widget.TextView;

import com.mt.skyhoist.R;

public class ModifingNameDialog extends Dialog {
    public ModifingNameDialog(@NonNull Context context) {
        super(context, R.style.CustomDialog);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_name_modifing);
        setCanceledOnTouchOutside(false);
        setCancelable(false);

        initView();
    }

    private TextView msgTv;

    private void initView() {
        msgTv = findViewById(R.id.msg_tv);
        msgTv.setText(msg);
    }

    private String msg;

    public void setMessage(String msg) {
        this.msg = msg;
        if (msgTv != null) {
            msgTv.setText(msg);
        }
    }
}
